﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using CQIE.TES.IDAL;
using CQIE.TES.IService;
using CQIE.TES.Model;
using CQIE.TES.WEB.USER.Models;

namespace CQIE.TES.Service
{
    public class EvaluaHeightService:IEvaluaHeightService
    {
        private IEvaluaHeightDAL _dal;
        public EvaluaHeightService(IEvaluaHeightDAL dal)
        {
            _dal = dal;
        }


        public bool AddEva(EvaluaHeight model)
        {
            return _dal.AddnewEva(model);
        }

        public List<EvaluaHeight> GetEvaluaHeightsByRole(ROLE_ENUM role)
        {
            return _dal.GetEvaluaHeightsByRole(role);
        }

        public List<EvaluaHeight> GetAllEva(int page, int pageSize, out int count, int studyYearId = -1)
        {
            return _dal.GetAllEva(page-1,pageSize,out count,studyYearId);
        }

        public bool StartEvaNow(int evaId)
        {
            return _dal.StartEvaNow(evaId);
        }

        public bool EndEvaNow(int evaId)
        {
            return _dal.EndEvaNow(evaId);
        }

        public bool HaveEvaing()
        {
            return _dal.HaveEvaing();
        }
    }
}
